package com.zjw.video.common.entity.req;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * desc
 *
 * @author wangcheng
 * @date 2023/5/8 8:48
 */
@Getter
@Setter
@ToString
@Schema(name = "BasePageReq", description = "BasePageReq")
public class BasePageReq {

    @Schema(description = "每页大小")
    private Integer pageSize;

    @Schema(description = "页码")
    private Integer pageNum;



    public BasePageReq() {
        initPageInfo();
    }

    public void initPageInfo() {
        if (pageNum == null) {
            pageNum = 1;
        }
        if (pageSize == null) {
            pageSize = 10;
        }
    }
}